

<div class="col-sm-12 mt20" >
<div class="panel panel-default">
<div class="panel-body">
<div class="col-sm-12">

    <div class="row">
        <div class="col-sm-2">
            <input type="text" class="form-control" ng-model="searchform.code" placeholder="产品编号">
        </div>
        <div class="col-sm-2">
            <input type="text" class="form-control" ng-model="searchform.name" placeholder="产品名称"> 
        </div>
        <div class="col-sm-2">
            
        </div>
        <div class="col-sm-2">
           
        </div>

        <div class="col-sm-2 col-sm-offset-2">
            <button class="btn btn-block btn-info" ng-click="load(searchform)">搜索</button> 
        </div>

    </div>

</div>
</div>
</div>
<!-- searchArea -->

<div class="panel panel-default">
    <div class="panel-body">
        <table class="table table-condensed table-hover table-bordered">
            <thead>
                <tr>
                    <th class="col-md-5 text-center">产品</th>
                    <th class="col-md-2 text-center">信息</th>
                    <!-- <th class="col-md-1 text-center">图片</th> -->
                    <th class="col-md-1 text-center">类别</th>
                    <th class="col-md-1 text-center">栏目</th>
                    <th class="col-md-1 text-center">排序</th>
                    <th class="col-md-2 text-center">操作</th>
                </tr>
            </thead>
            <tbody>
                <tr ng-repeat="obj in objs">
                    <td class="">
                        产品名称：{{obj.name}}<br>
                        产品编号：{{obj.code}}<br>
                        指导价：{{obj.guide_price | currency : '￥'}}
                    </td>
                    <td class="text-center">
                        产品类型：{{obj.product_typename}}<br>
                        库存：
                        <span ng-if="obj.stock_type == '1'" >
                            {{obj.current_stock_num}}
                        </span>
                        <span ng-if="obj.stock_type == '0'" >不启用</span><br>
                        实名：{{obj.auth_statename}}
                    </td>
                    <!-- <td class="text-center">
                        <a ng-click="setImage(obj)" class="btn btn-success btn-xs btn-block">设置多图</a>
                        <a ng-click="setPoster(obj)" class="btn btn-success btn-xs btn-block">设置海报</a>
                    </td> -->
                    <td class="text-center">
                        <ui-select ng-model="obj.type_code" theme="bootstrap" ng-keyup="myKeyup($event)">
                              <ui-select-match placeholder="设置类别">
                                {{$select.selected.type_name}}
                              </ui-select-match>
                              <ui-select-choices repeat="item.type_code as item in typearr | filter: $select.search">
                                <span ng-bind-html="item.type_name | highlight: $select.search"></span>
                              </ui-select-choices>
                        </ui-select>

                        <a ng-click="setType(obj)" class="btn btn-success btn-xs btn-block mt5">设置</a>
                    </td>

                    <td class="text-center">
                        <!-- <select class="form-control" ng-model="obj.type_code" 
                          ng-options="type.type_code as type.type_name for type in typearr"
                        >
                        </select> -->

                        <ui-select ng-model="obj.column_code" theme="bootstrap" ng-keyup="myKeyup($event)">
                              <ui-select-match placeholder="设置栏目">
                                {{$select.selected.column_name}}
                              </ui-select-match>
                              <ui-select-choices repeat="item.column_code as item in columnarr | filter: $select.search">
                                <span ng-bind-html="item.column_name | highlight: $select.search"></span>
                              </ui-select-choices>
                        </ui-select>

                        <a ng-click="setColumn(obj)" class="btn btn-success btn-xs btn-block mt5">设置</a>
                    </td>


                    <td class="text-center">
                        <input class="form-control input-sm" type="text" value="{{obj.asort}}" ng-model="obj.asort">
                        <a ng-click="asort(obj, obj.asort)" class="btn btn-info btn-xs btn-block mt5">设置</a>
                    </td>
                    <td class="text-center">
                        <a ng-click="config(obj)" class="btn btn-success btn-xs">设置</a>
                        
                        <a ng-click="commission(obj)" class="btn btn-info btn-xs">设置佣金</a>
                        <a
                         ng-if="obj.mystate == '2'"
                         ng-click="up(obj)" class="btn btn-success btn-xs">上架</a>

                        <a 
                         ng-if="obj.mystate == '1'"
                         ng-click="down(obj)" class="btn btn-success btn-xs">下架</a>

                         <a ng-if="obj.mystate == '2'" 
                         ng-click="del(obj)" class="btn btn-danger btn-xs">删除</a>

                         <a ng-click="putOut(obj)" class="btn btn-info btn-xs">发布</a>


                         <!-- <a
                         ng-show="obj.product_type == '1'||obj.myproduct == '1'"
                         ng-click="setprice(obj)" class="btn btn-warning btn-xs">修改价格</a> -->
                         <!-- <a
                         ng-show="obj.release == '0'&&obj.myproduct == '0'&&obj.mystate == '1'"
                         ng-click="release(obj)" class="btn btn-primary btn-xs">发布到产品市场</a> -->
                    </td>
                </tr>
            </tbody>
        </table>
        <div class="text-right">
             <pagination total-items="bigTotalItems" ng-model="bigCurrentPage" ng-change="load()" previous-text="上一页" next-text="下一页"
                first-text="首页" last-text="尾页" max-size="maxSize" boundary-links="true" rotate="false" items-per-page="itemsPerPage"
                class="m-t-none m-b">
            </pagination>
        </div>
    </div>
</div>

</div>